package com.neu.wms.mapper;

import com.neu.wms.dto.PersmissionDto;
import com.neu.wms.entity.SysMenu;
import com.neu.wms.vo.TreeNodeVo;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
* @author 冯Sir
* @description 针对表【sys_menu(菜单权限表)】的数据库操作Mapper
* @createDate 2023-06-26 15:42:49
* @Entity com.neu.wms.entity.SysMenu
*/
@Mapper
public interface SysMenuMapper {
    /**
     * @Description 删除当前角色拥有的权限
     * @param roleId
     * @Return void
     * @Author  fengSir
     * @Date    Create by 2023-06-28 11:05
     */
    void deletePermissionByRid(Integer roleId);
    /**
     * @Description 批量插入新的权限
     * @param persmissionDto
     * @Return void
     * @Author  fengSir
     * @Date    Create by 2023-06-28 11:06
     */
    void insertPermissionByRoleID(PersmissionDto persmissionDto);
    /**
     * @Description 得到当前角色拥有权限id
     * @param rid
     * @Return java.lang.Integer[]
     * @Author  fengSir
     * @Date    Create by 2023-06-28 9:23
     */
    Integer[] selectByRid(Integer rid);
    /**
     * @Description 得到所有权限和菜单
     * @param parentId
     * @Return java.util.List<com.neu.wms.vo.TreeNodeVo>
     * @Author  fengSir
     * @Date    Create by 2023-06-28 9:23
     */
    List<TreeNodeVo> selectAll(Integer parentId);

    int deleteByPrimaryKey(Long id);

    int insert(SysMenu record);

    int insertSelective(SysMenu record);

    SysMenu selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(SysMenu record);

    int updateByPrimaryKey(SysMenu record);

    List<SysMenu> queryMenu();

    Integer[] selectMenuIdByUid(Integer uid);
}
